import Taro, { Component } from '@tarojs/taro'
import { View, Text, Image, Picker, Swiper, SwiperItem } from '@tarojs/components'
import {AtTabs,AtTabsPane,AtGrid,AtList,AtListItem} from 'taro-ui'
import './dingxiangwenzhen.scss'
import app from '../../../../main.js'
// import reactMixin from 'react-mixin';
// import myJs from '../../pages/dingxiangwenzhen/dingxiangwenzhenjs.js'
export default class Dingxiangwenzhen extends Component {
    config = {
        navigationBarTitleText: '定向问诊'
    }
    // constructor () { 
    //     super(...arguments); 
    //     this.state = this.getData(); 
    // }
    componentWillMount () {}
    componentDidMount () {}
    componentWillUnmount () {}
    componentDidShow () {}
    componentDidHide () {}
    navigateTo(url) { Taro.navigateTo({url: url}) }
    constructor () {
        super(...arguments)
        this.state = {
          current: 0,
        }
      }
      handleClick (value) {
        this.setState({
          current: value
        })
      }
      go(item,index){
          if(index===0){
            this.navigateTo('../wenzhenshezhi/wenzhenshezhi');
          }
          else{
            this.navigateTo('../operatingguide/operatingguide');
          }
      }
    render () {
        return (
            <View className='dingxiangwenzhen'>
                <AtTabs current={this.state.current} tabList={[{title:'定向问诊'},{title:'非定向问诊'},{title:'团队问诊'}]} onClick={this.handleClick.bind(this)}>
                    <AtTabsPane current={this.state.current} index={0}>
                        <AtGrid onClick={this.go} mode='rect' columnNum='2' data={[{ image:app.imageUri+'img/shezhi.png',value:'问诊设置'},{ image:app.imageUri+'img/zhinan.png',value:'使用指南'}]} className=' class_0'>
                        </AtGrid>
                        <AtList>
                            <AtListItem title='张三    青光眼' note='张三：医生我的病情......' extraText='16:35' thumb={app.imageUri+'img/d1.jpg'}></AtListItem>
                        </AtList>
                        <AtList>
                            <AtListItem title='李四    青光眼' note='我：医生我的病情......' extraText='12月9日' thumb={app.imageUri+'img/d1.jpg'}></AtListItem>
                        </AtList>
                    </AtTabsPane>
                    <AtTabsPane current={this.state.current} index={1}>
                        <AtGrid onClick={this.go} mode='rect' columnNum='2' data={[{ image:app.imageUri+'img/shezhi.png',value:'问诊设置'},{ image:app.imageUri+'img/zhinan.png',value:'使用指南'}]} className=' class_1'>
                        </AtGrid>
                        <AtList>
                            <AtListItem title='张三    青光眼' note='张三：医生我的病情......' extraText='16:35' thumb={app.imageUri+'img/d1.jpg'}></AtListItem>
                        </AtList>
                        <AtList>
                            <AtListItem title='李四    青光眼' note='我：医生我的病情......' extraText='12月9日' thumb={app.imageUri+'img/d1.jpg'}></AtListItem>
                        </AtList>
                    </AtTabsPane>
                    <AtTabsPane current={this.state.current} index={2}>
                        <AtGrid onClick={this.go} mode='rect' columnNum='2' data={[{ image:app.imageUri+'img/shezhi.png',value:'问诊设置'},{ image:app.imageUri+'img/zhinan.png',value:'使用指南'}]} className=' class_2'>
                        </AtGrid>
                        <AtList>
                            <AtListItem title='张三    青光眼' note='张三：医生我的病情......' extraText='16:35' thumb={app.imageUri+'img/d1.jpg'}></AtListItem>
                        </AtList>
                        <AtList>
                            <AtListItem title='李四    青光眼' note='我：医生我的病情......' extraText='12月9日' thumb={app.imageUri+'img/d1.jpg'}></AtListItem>
                        </AtList>
                    </AtTabsPane>
                </AtTabs>
            </View>
        );
    }
}
// reactMixin.onClass(Dingxiangwenzhen,myJs);